package cosmos.dubbo.cunsumer.service;

import cosmos.dubbo.domain.User;
import cosmos.dubbo.dto.UserDto;
import cosmos.dubbo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

/**
 * .
 *
 * @author sunhao(sunhao.java@gmail.com)
 * @version V1.0, 2016-2-4 11:07
 */
@Service
public class TestService {
    @Autowired
    private UserService userService;

    public Long save(UserDto userDto) {
        return userService.save(userDto);
    }

    public Long delete(Long id) {
        return userService.delete(id);
    }

    public Long update(UserDto userDto) {
        return userService.update(userDto);
    }

    public User loadUser(Long id) {
        return userService.loadUser(id);
    }

    public Page<User> list(Pageable pageable) {
        return userService.list(pageable);
    }
}
